import request from '@/utils/request'

// 登录
export function dologin(username,password){
	return request({
		method: "get",
		url:'v2/user/dologin',
		params: {
			username,
			password
		},
	})
}
// 根据token获取用户信息
export function getUserInfo(token){
	return request({
		method: "get",
		url:'v2/user/getUserInfo',
		headers:{
			token:token
		}
	})
}

// 获取验证码 验证码登录
export function getemailcode(email){
	return request({
		method: "get",
		url:'v2/user/getemailcode',
		params: {
			email
		},
	})
}
// 判断验证码
export function iscode(params){
	return request({
		method: "POST",
		url:'v2/user/iscode',
		data:params
	})
}
// 注册
export function addUser(params){
	return request({
		method: "POST",
		url:'v2/user/user',
		data: params,
	})
}
